
<include file="Public:header" />
<div class="span-24 last">
    <include file="Public:menu" />
    <div class="span-19 last">
        <switch name="ACTION_NAME">
            <case value="add">
                <h4>添加模板</h4>
                <form name="form" method="post" action="__URL__/doadd">
                    <table border="1" cellspacing="1" >
                        <tr>
                            <th>模板名</th>
                            <td><input type="text" name="subject" value=""  /></td>
                        </tr>
                        <tr>
                            <th>模板code</th>
                            <td><input type="text" name="code" value=""  /></td>
                        </tr>
                        <tr>
                            <th>描述</th>
                            <td><html:editor id="editor" name="content" type="FCKeditor" content="" /></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" value="提交"  /></div>
                </form>
            </case>
            <case value="edit">
                <h4>编辑模板</h4>
                <form name="form" method="post" action="__URL__/doedit">
                    <table border="0" cellspacing="1" >
                        <tr>
                            <th>ID</th>
                            <td>{$id}<input type="hidden" name="id" value="{$id}"></td>
                        </tr>
                        <tr>
                            <th>模板名</th>
                            <td><input type="text" name="subject" value="{$subject}"  /></td>
                        </tr>

                        <tr>
                            <th>code</th>
                            <td><input type="text" name="code" value="{$code}"  /></td>
                        </tr>
 
                        <tr>
                            <th>描述</th>
                            <td><html:editor id="editor" name="content" type="FCKeditor" content="{$content}" /></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" value="提交"  /></div>
                </form>
            </case>
            <default />
            <include file="Public:searchbar" />
            <form name="memberform" method="post" action="__URL__/batch">
                <table width="100%" border="1" cellspacing="1" >
                    <tr>
                        <th width="20"><input name="checkbox" type="checkbox"  onClick="selAll(this)" /></th>
                        <th width="30">ID</th>
                        <th>模板名</th>
                        <th>模板code</th>
                        <th width="150">操作</th>
                    </tr>
                    <volist name="templates" id="temp">
                        <tr>
                            <td><input name="id[]" type="checkbox" id="id[]" value="{$temp.id}"  /></td>
                            <td>{$temp.id}</td>
                            <td><a href="__URL__/edit/id/{$temp.id}">{$temp.subject}</a></td>
                            <td><a href="__URL__/edit/id/{$temp.id}">{$temp.code}</a></td>
                        <td><a href="__URL__/edit/id/{$temp.id}">编辑</a> <a href="__URL__/batch/act/delete/id/{$temp.id}">删除</a></td>
                        </tr>
                    </volist>

                </table>

                <input name="act" type="radio" value="delete" />删除
                <input type="submit" value="提交"  />

            </form>
            <include file="Public:paging" />
        </switch>
    </div>
    <div class="clear"></div>
</div>
<include file="Public:footer" />